lu decomposition method to find inverse of a matrix